package modele;

public class Theme {

	private int id_theme;
	private String libelle;

	public Theme() {

	}

	public Theme(int id_theme, String libelle) {

		this.id_theme = id_theme;
		this.libelle = libelle;
	}

	public Theme(String libelle) {

		this.libelle = libelle;
	}

	public int getId_theme() {
		return id_theme;
	}

	public void setId_theme(int id_theme) {
		this.id_theme = id_theme;
	}

	public String getLibelle() {
		return libelle;
	}

	public void setLibelle(String libelle) {
		this.libelle = libelle;
	}

	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result + id_theme;
		result = prime * result + ((libelle == null) ? 0 : libelle.hashCode());
		return result;
	}

	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		Theme other = (Theme) obj;
		if (id_theme != other.id_theme)
			return false;
		if (libelle == null) {
			if (other.libelle != null)
				return false;
		} else if (!libelle.equals(other.libelle))
			return false;
		return true;
	}

	@Override
	public String toString() {
		return "Theme : id_theme = " + id_theme + ", libelle = " + libelle
				+ " ;";
	}

}
